﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace ChuongtrinhTracnghiem.Model
{
    class Ketnoi
    {
        public static string strcon = @"Data Source=(local);Initial Catalog=TracnghiemData;Integrated Security=True";
        static public SqlConnection con = new SqlConnection(strcon);
        public static void Thuchienketnoi()
        {
            try
            {
                con.Open();
                //MessageBox.Show("Thành công");
            }

            catch (Exception x)
            {
                MessageBox.Show("Kết nối không thành công");
            }
        }
        public static void Boketnoi()
        {
            con.Close();
        }
    }
}
